//注册默认超级管理员//注册默认用户
const mongoose = require('mongoose');
const AdminModel = mongoose.models['Admin'];
const md5=require("md5");


let register=async function(){
    let user=await AdminModel.findOne({loginId:'admin'});
    if(!user){
        await AdminModel.create({
            loginId:`admin`,
            password:md5('admin888'),
            token:'',
            lastLoginIp:''
        });
    }
}

register();
